{% extends "base.html" %}

{% block content %}

<a href="/events/create/">Create new event</a>

{% if message %}
      {{ message|safe }}
{% endif %}

{% if event_list %}
    <ul>
    {% for event in event_list %}
      <li><a href="/events/{{ event.id }}/">{{ event.name }}</a>
          <a href="/events/{{ event.id }}/delete/">delete</a>
      </li>
    {% endfor %}
    </ul>
{% else %}
    <p>No events are available.</p>
{% endif %}

{% endblock %}